package com.jzg.jcptadmin.data.vo;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by jzg on 2016/1/6.
 */
public class SuccessValuationData implements Parcelable {

    /**
     * status : 100
     * msg : 评估成功
     * AssessResult : 0
     * JZGPrice : {"JZGAssessmentPrice":0,"JZGSalePrice":0}
     */

    private String status;
    private String msg;
    //0：不需要弹窗，直接评估成功或失败
    // 1：需要弹窗提示“您的估值很准确，继续努力”
    // 2：需要弹窗提示“请确认您的价格是否符合当地市场价”
    private String AssessResult;
    private JZGPriceEntity JZGPrice;

    public void setStatus(String status) {
        this.status = status;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public void setAssessResult(String AssessResult) {
        this.AssessResult = AssessResult;
    }

    public void setJZGPrice(JZGPriceEntity JZGPrice) {
        this.JZGPrice = JZGPrice;
    }

    public String getStatus() {
        return status;
    }

    public String getMsg() {
        return msg;
    }

    public String getAssessResult() {
        return AssessResult;
    }

    public JZGPriceEntity getJZGPrice() {
        return JZGPrice;
    }

    public static class JZGPriceEntity implements Parcelable {

        /**
         * JZGAssessmentPrice : 0
         * JZGSalePrice : 0
         */

        private String JZGAssessmentPrice;//数据模型收车价
        private String JZGSalePrice;//数据模型售车价
        private int isConfirmSubmit;//评估误差较大时，是否确认提交 1是 0否

        public int getIsConfirmSubmit() {
            return isConfirmSubmit;
        }

        public void setIsConfirmSubmit(int isConfirmSubmit) {
            this.isConfirmSubmit = isConfirmSubmit;
        }

        public String getJZGAssessmentPrice() {
            return JZGAssessmentPrice;
        }

        public void setJZGAssessmentPrice(String JZGAssessmentPrice) {
            this.JZGAssessmentPrice = JZGAssessmentPrice;
        }

        public String getJZGSalePrice() {
            return JZGSalePrice;
        }

        public void setJZGSalePrice(String JZGSalePrice) {
            this.JZGSalePrice = JZGSalePrice;
        }

        public JZGPriceEntity() {
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.JZGAssessmentPrice);
            dest.writeString(this.JZGSalePrice);
            dest.writeInt(this.isConfirmSubmit);
        }

        protected JZGPriceEntity(Parcel in) {
            this.JZGAssessmentPrice = in.readString();
            this.JZGSalePrice = in.readString();
            this.isConfirmSubmit = in.readInt();
        }

        public static final Creator<JZGPriceEntity> CREATOR = new Creator<JZGPriceEntity>() {
            public JZGPriceEntity createFromParcel(Parcel source) {
                return new JZGPriceEntity(source);
            }

            public JZGPriceEntity[] newArray(int size) {
                return new JZGPriceEntity[size];
            }
        };
    }

    public SuccessValuationData() {
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.status);
        dest.writeString(this.msg);
        dest.writeString(this.AssessResult);
        dest.writeParcelable(this.JZGPrice, 0);
    }

    protected SuccessValuationData(Parcel in) {
        this.status = in.readString();
        this.msg = in.readString();
        this.AssessResult = in.readString();
        this.JZGPrice = in.readParcelable(JZGPriceEntity.class.getClassLoader());
    }

    public static final Creator<SuccessValuationData> CREATOR = new Creator<SuccessValuationData>() {
        public SuccessValuationData createFromParcel(Parcel source) {
            return new SuccessValuationData(source);
        }

        public SuccessValuationData[] newArray(int size) {
            return new SuccessValuationData[size];
        }
    };
}
